//package com.allwees.bs.c.common.auth.config;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.data.redis.connection.RedisConnectionFactory;
//import org.springframework.security.oauth2.provider.token.TokenStore;
//import org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore;
//
//@Configuration
//public class TokenStoreConfig {
//
//    @Autowired
//    private CustomAuthenticationKeyGenerator customAuthenticationKeyGenerator;
//
//    /**
//     * 配置token 的存储
//     * @param redisConnectionFactory
//     * @return
//     */
//    @Bean
//    public TokenStore tokenStore(RedisConnectionFactory redisConnectionFactory) {
//        RedisTokenStore redisTokenStore = new RedisTokenStore(redisConnectionFactory);
//        redisTokenStore.setAuthenticationKeyGenerator(customAuthenticationKeyGenerator);
//        redisTokenStore.setPrefix("auth:c-token::");
//        return redisTokenStore;
//    }
//
//}
